/*
 * Created on 16/04/2006
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package util.math;

import java.awt.Color;

/**
 * @author dedalus
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class ColorMath {
	public static float calcularDistanciaEuclidiana(Color colorA, Color colorB) {		
		return (float)
			(Math
				.sqrt(
					Math.pow((colorA.getRed() - colorB.getRed()), 2)
						+ Math.pow((colorA.getGreen() - colorB.getGreen()), 2)
						+ Math.pow((colorA.getBlue() - colorB.getBlue()), 2)));
	}
}
